<template>
  <div>
    <el-card shadow="never">
      <el-steps :active="activeIdx" simple finish-status="success" style="margin-top: 5px">
        <el-step title="1. 企业注册"></el-step>
        <el-step title="2. 完善信息"></el-step>
        <el-step title="3. 用户审批"></el-step>
        <el-step title="4. 注册成功"></el-step>
      </el-steps>
      <supplier-register-step1 style="margin-top: 20px" v-if="activeIdx == 0" @nextStep="nextStep"></supplier-register-step1>
      <supplier-register-step2 style="margin-top: 20px" v-if="activeIdx == 1" @nextStep="nextStep"></supplier-register-step2>
    </el-card>
  </div>
</template>

<script>
  import supplierRegisterStep1 from './supplier-register-step1'
  import supplierRegisterStep2 from './supplier-register-step2'
  export default {
    components: {
      supplierRegisterStep1,
      supplierRegisterStep2
    },
    data () {
      return {
        activeIdx: 0
      }
    },
    methods: {
      nextStep () {
        this.activeIdx += 1
      }
    }
  }
</script>
